/**
 * Desenvolvido pela Fábrica de Software do CESUPA.
 * Todos os direitos reservados.
 */
package br.cesupa.fabsoft.nomedoprojeto.modules.helpmodule;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 *
 * @author Breno Leite
 */
public class TreeItem {

    private String text;
    private List<TreeItem> childs = new ArrayList<TreeItem>();
    private Map<String,String> properties = new HashMap<String,String>();
    private boolean isDirectory;

    public TreeItem(String text){
        setText(text);
    }

    /**
     * @return the text
     */
    public String getText() {
        return text;
    }

    /**
     * @param text the text to set
     */
    public void setText(String text) {
        this.text = text;
    }

    public void addChild(TreeItem treeItem){
        getChilds().add(treeItem);
    }

    /**
     * @return the childs
     */
    public List<TreeItem> getChilds() {
        return childs;
    }

    /**
     * @param childs the childs to set
     */
    public void setChilds(List<TreeItem> childs) {
        this.childs = childs;
    }

    /**
     * @return the properties
     */
    public Map<String, String> getProperties() {
        return properties;
    }

    /**
     * @param properties the properties to set
     */
    public void setProperties(Map<String, String> properties) {
        this.properties = properties;
    }

    /**
     * @return the isDirectory
     */
    public boolean isIsDirectory() {
        return isDirectory;
    }

    /**
     * @param isDirectory the isDirectory to set
     */
    public void setIsDirectory(boolean isDirectory) {
        this.isDirectory = isDirectory;
    }
}
